//
//  HCRenameAPI.m
//  HerconWaterFilter
//
//  Created by JianWei Chen on 17/4/19.
//  Copyright © 2017年 JianWei Chen. All rights reserved.
//

#import "RenameAPI.h"

@implementation RenameAPI{
    NSDictionary *_dic;
}

-(id)initWithDic:(NSDictionary *)dic{
    if (self = [super init]) {
        _dic = dic;
    }
    return self;
}

- (NSString *)requestUrl {
    return @"/device/rename";
}

- (YTKRequestMethod)requestMethod {
    return YTKRequestMethodPOST;
}

- (id)requestArgument {
    NSMutableDictionary *dic = [NSMutableDictionary getPubdic];
    [dic setValuesForKeysWithDictionary:_dic];
    NSString *sign=[NSString getSign:dic];
    [dic setObject:sign forKey:@"sign"];
    return dic;
}

- (NSString *)userId {
    return [[[self responseJSONObject] objectForKey:@"userId"] stringValue];
}


-(void)dealloc
{
    NSLog(@"%@ dealloc",[self class]);
}

@end
